import { Commit } from "vuex";
interface IState {
  nav: INav[];
  data: IHot[];
  loading: boolean;
}
interface IHot {
  activity: string;
  activity_type: number;
  addtime: string;
  anchor_id: Array<any>;
  batch_link: string;
  batch_num: string;
  batch_price: string;
  batch_quan_jine: string;
  batch_quan_num: string;
  batch_quan_over: string;
  batch_quan_time: string;
  batch_status: string;
  brand_english: string;
  brand_id: number;
  brand_name: string;
  brand_score: string;
  cate_name: string;
  category_id: number;
  category_str: string;
  chaoshi: number;
  cid: number;
  circle_text: string;
  cms_floor_status: string;
  comment: number;
  copy_pic: string;
  d_title: string;
  direct_yongjin_type: number;
  discount_cut: number;
  discount_full: number;
  discount_type: number;
  divisor: number;
  dsr: number;
  flagship_store: number;
  freeship_remote_district: number;
  fresh: number;
  goodsid: string;
  gray_type: Array<any>;
  group_id: Array<any>;
  has_special: number;
  hot_push: number;
  hot_value: string;
  huodong_type: number;
  hz_quan_over: number;
  id: number;
  is_black_list: number;
  is_brand: number;
  is_brand_business: number;
  is_caozuo: number;
  is_choice: number;
  is_delete: number;
  is_dtk_sole: number;
  is_fashion: number;
  is_flagship: number;
  is_full_cut: number;
  is_gray_list: number;
  is_group: number;
  is_haitao: number;
  is_jyj: number;
  is_online: number;
  is_pinpai: number;
  is_qbb: number;
  is_subdivision: number;
  is_tbhc: number;
  is_tm_black: number;
  is_tm_zs: number;
  is_video: number;
  is_vip: number;
  istmall: number;
  jiage: number;
  jihua_link: string;
  jihua_shenhe: number;
  jing: number;
  jinpaimaijia: number;
  jipin: number;
  keshang: number;
  label: { type: number; title: string }[];
  lowest: number;
  market_group: Array<any>;
  miaoshu: string;
  nearly_min_price: string;
  neirong: string;
  normal_label_text: string;
  p_labels: Array<any>;
  pay_front_num: number;
  percent1: number;
  pic: string;
  pinpai_id: number;
  praise_rate: number;
  preferential: string;
  pure_push_switch: number;
  quan_id: string;
  quan_jine: number;
  quan_link: string;
  quan_m_link: string;
  quan_num: number;
  quan_over: number;
  quan_start_time: string;
  quan_tiaojian: string;
  quan_time: string;
  que_siteid: string;
  rank_num: number;
  recommend_num: string;
  recommend_score: string;
  red_packet: string;
  renqi: string;
  sales_24h_cms: number;
  sales_30day: number;
  sao_cishu: number;
  sao_time: string;
  seller_id: string;
  sellnum: string;
  shop_level: number;
  shop_name: string;
  shoufa: number;
  sort_score: string;
  sort_score3: string;
  sort_score4: number;
  special_content: string;
  special_label: Array<any>;
  start_time: string;
  subdivision_id: number;
  subdivision_name: string;
  subdivision_rank: number;
  super_pic: string;
  t_labels: Array<any>;
  team_name: string;
  title: string;
  tk_zs_id: number;
  today_click: number;
  today_sellnum: string;
  today_tuiguang: number;
  updatetime: string;
  xiaoliang: string;
  xing: number;
  xinpin: number;
  yongjin: number;
  yongjin_jihua: number;
  yongjin_que: number;
  yongjin_type: number;
  yuanjia: number;
  yunfeixian: number;
  zhongfen: number;
  zid: number;
  zt: number;
}
interface INav {
  id: string;
  cid: string;
  name: string;
  banner: string;
  jump_url: string;
  url: string;
  icon: string;
  sub_class: IClass[];
}
interface IClass {
  jump_url: string;
  s_type: number;
  name: string;
  icon: string;
  id: string;
  api_id: string;
  original_id: string;
}
interface IGetNav {
  type: string;
  payload: INav[];
}
interface IGetHot {
  type: string;
  payload: IHot[];
}
interface ICat {
  namespaced: boolean;
  state: IState;
  actions: {
    getnav: ({ commit }: { commit: Commit }) => void;
    gethot: ({ commit }: { commit: Commit }, { cid }: { cid: string }) => void;
    getlatest: (
      { commit }: { commit: Commit },
      { cid }: { cid: string }
    ) => void;
    getsell: ({ commit }: { commit: Commit }, { cid }: { cid: string }) => void;
    getprice: (
      { commit }: { commit: Commit },
      { cid }: { cid: string }
    ) => void;
    setload: ({ commit }: { commit: Commit }) => void;
  };
  mutations: {
    GETNAV: (state: IState, action: IGetNav) => void;
    GETHOT: (state: IState, action: IGetHot) => void;
    GETLATEST: (state: IState, action: IGetHot) => void;
    GETSELL: (state: IState, action: IGetHot) => void;
    GETPRICE: (state: IState, action: IGetHot) => void;
    SETLOAD: (state: IState) => void;
  };
}
export { ICat, IGetNav, INav, IGetHot, IHot };
